// FeedStoryTemplate.cs
// Facebook/Framework/Service
// Copyright (c) 2007, Nikhil Kothari. All Rights Reserved.
//

using System;
using System.Collections.Generic;
using System.Diagnostics;

namespace Facebook.Service {

    /// <summary>
    /// Represents a template for a feed story.
    /// </summary>
    public sealed class FeedStoryTemplate {

        private string _titleTemplate;
        private string _bodyTemplate;

        /// <summary>
        /// Initializes a feed story template with the specified title and body templates.
        /// </summary>
        /// <param name="titleTemplate">The template used to title the story</param>
        public FeedStoryTemplate(string titleTemplate)
            : this(titleTemplate, null) {
        }

        /// <summary>
        /// Initializes a feed story template with the specified title and body templates.
        /// </summary>
        /// <param name="titleTemplate">The template used to title the story</param>
        /// <param name="bodyTemplate">The template used to define the body of the story.</param>
        public FeedStoryTemplate(string titleTemplate, string bodyTemplate) {
            if (String.IsNullOrEmpty(titleTemplate)) {
                throw new ArgumentNullException("titleTemplate");
            }

            _titleTemplate = titleTemplate;
            _bodyTemplate = bodyTemplate;
        }

        /// <summary>
        /// Gets the template representing the body of the story.
        /// </summary>
        public string BodyTemplate {
            get {
                return _bodyTemplate;
            }
        }

        /// <summary>
        /// Gets the template representing the title of the story.
        /// </summary>
        public string TitleTemplate {
            get {
                return _titleTemplate;
            }
        }
    }
}
